package com.zoran.study.spring.aop;

import com.zoran.study.spring.service.Processor;
import com.zoran.study.spring.service.impl.DefaultProcessor;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.DeclareParents;
import org.springframework.stereotype.Component;

/**
 * DeclareAspect
 *
 * @author zouxm
 * @date 2018/4/12
 */
//@Aspect
@Component
public class DeclareAspect {

    //通过Aop为Bean增加新的方法
    @DeclareParents(value = "com.zoran.study.spring.service.UserService+",defaultImpl = DefaultProcessor.class)
    public Processor processor;
}
